// Element UI 到 Element Plus 图标映射
export const iconMapping = {
  // 基础图标
  'el-icon-s-home': 'House',
  'el-icon-document': 'Document',
  'el-icon-connection': 'Connection',
  'el-icon-folder': 'Folder',
  'el-icon-folder-opened': 'FolderOpened',
  'el-icon-link': 'Link',
  'el-icon-menu': 'Menu',
  'el-icon-view': 'View',
  'el-icon-cpu': 'Cpu',
  'el-icon-coin': 'Coin',
  'el-icon-data-board': 'DataBoard',
  'el-icon-s-grid': 'Grid',
  'el-icon-box': 'Box',
  'el-icon-database': 'Database',
  'el-icon-monitor': 'Monitor',
  'el-icon-document-copy': 'DocumentCopy',
  'el-icon-time': 'Clock',
  'el-icon-files': 'Files',
  'el-icon-s-data': 'DataLine',
  'el-icon-s-platform': 'Platform',
  'el-icon-s-marketing': 'TrendCharts',
  'el-icon-s-cooperation': 'Connection',

  // 操作图标
  'el-icon-right': 'ArrowRight',
  'el-icon-arrow-right': 'ArrowRight',
  'el-icon-arrow-down': 'ArrowDown',
  'el-icon-arrow-up': 'ArrowUp',
  'el-icon-arrow-left': 'ArrowLeft',
  'el-icon-video-play': 'VideoPlay',
  'el-icon-star-on': 'Star',
  'el-icon-question': 'QuestionFilled',
  'el-icon-loading': 'Loading',
  'el-icon-refresh-left': 'RefreshLeft',
  'el-icon-more': 'More',
  'el-icon-date': 'Calendar',
  'el-icon-back': 'Back',
  'el-icon-top': 'Top',
  'el-icon-bottom': 'Bottom',

  // 主题图标
  'el-icon-sunny': 'Sunny',
  'el-icon-moon': 'Moon',

  // 代码生成相关
  'el-icon-magic-stick': 'MagicStick',
  'el-icon-document-add': 'DocumentAdd',

  // 其他常用图标
  'el-icon-edit': 'Edit',
  'el-icon-delete': 'Delete',
  'el-icon-plus': 'Plus',
  'el-icon-minus': 'Minus',
  'el-icon-search': 'Search',
  'el-icon-refresh': 'Refresh',
  'el-icon-setting': 'Setting',
  'el-icon-user': 'User',
  'el-icon-check': 'Check',
  'el-icon-close': 'Close',
  'el-icon-warning': 'Warning',
  'el-icon-success': 'SuccessFilled',
  'el-icon-error': 'CircleCloseFilled',
  'el-icon-info': 'InfoFilled',
  'el-icon-download': 'Download',
  'el-icon-upload': 'Upload',
  'el-icon-copy-document': 'CopyDocument',
  'el-icon-full-screen': 'FullScreen',
  'el-icon-aim': 'Aim',
  'el-icon-bell': 'Bell',
  'el-icon-camera': 'Camera',
  'el-icon-chat-dot-round': 'ChatDotRound',
  'el-icon-chat-line-round': 'ChatLineRound',
  'el-icon-chat-round': 'ChatRound',
  'el-icon-chat-square': 'ChatSquare',
  'el-icon-circle-check': 'CircleCheck',
  'el-icon-circle-close': 'CircleClose',
  'el-icon-circle-plus': 'CirclePlus',
  'el-icon-cold-drink': 'ColdDrink',
  'el-icon-collection': 'Collection',
  'el-icon-comment': 'Comment',
  'el-icon-compass': 'Compass',
  'el-icon-coordinate': 'Coordinate',
  'el-icon-crop': 'Crop',
  'el-icon-d-arrow-left': 'DArrowLeft',
  'el-icon-d-arrow-right': 'DArrowRight',
  'el-icon-d-caret': 'DCaret',
  'el-icon-data-analysis': 'DataAnalysis',
  'el-icon-delete-location': 'DeleteLocation',
  'el-icon-delete-solid': 'DeleteFilled',
  'el-icon-discount': 'Discount',
  'el-icon-dish': 'Dish',
  'el-icon-dish-dot': 'DishDot',
  'el-icon-document-delete': 'DocumentDelete',
  'el-icon-document-remove': 'DocumentRemove',
  'el-icon-eleme': 'Eleme',
  'el-icon-eleme-filled': 'ElemeFilled',
  'el-icon-expand': 'Expand',
  'el-icon-failed': 'Failed',
  'el-icon-female': 'Female',
  'el-icon-film': 'Film',
  'el-icon-filter': 'Filter',
  'el-icon-finished': 'Finished',
  'el-icon-first-aid-kit': 'FirstAidKit',
  'el-icon-flag': 'Flag',
  'el-icon-fold': 'Fold',
  'el-icon-food': 'Food',
  'el-icon-fork-spoon': 'ForkSpoon',
  'el-icon-fries': 'Fries',
  'el-icon-goblet': 'Goblet',
  'el-icon-goblet-full': 'GobletFull',
  'el-icon-goblet-square': 'GobletSquare',
  'el-icon-goblet-square-full': 'GobletSquareFull',
  'el-icon-goods': 'Goods',
  'el-icon-goods-filled': 'GoodsFilled',
  'el-icon-grape': 'Grape',
  'el-icon-guide': 'Guide',
  'el-icon-headset': 'Headset',
  'el-icon-help': 'Help',
  'el-icon-help-filled': 'HelpFilled',
  'el-icon-hide': 'Hide',
  'el-icon-histogram': 'Histogram',
  'el-icon-home-filled': 'HomeFilled',
  'el-icon-hot-water': 'HotWater',
  'el-icon-house': 'House',
  'el-icon-ice-cream': 'IceCream',
  'el-icon-ice-cream-round': 'IceCreamRound',
  'el-icon-ice-cream-square': 'IceCreamSquare',
  'el-icon-ice-drink': 'IceDrink',
  'el-icon-ice-tea': 'IceTea',
  'el-icon-key': 'Key',
  'el-icon-knife-fork': 'KnifeFork',
  'el-icon-lightning': 'Lightning',
  'el-icon-list': 'List',
  'el-icon-location': 'Location',
  'el-icon-location-filled': 'LocationFilled',
  'el-icon-location-information': 'LocationInformation',
  'el-icon-lock': 'Lock',
  'el-icon-lollipop': 'Lollipop',
  'el-icon-magic-stick': 'MagicStick',
  'el-icon-magnet': 'Magnet',
  'el-icon-male': 'Male',
  'el-icon-map-location': 'MapLocation',
  'el-icon-medal': 'Medal',
  'el-icon-message': 'Message',
  'el-icon-message-box': 'MessageBox',
  'el-icon-mic': 'Mic',
  'el-icon-microphone': 'Microphone',
  'el-icon-milk-tea': 'MilkTea',
  'el-icon-minus': 'Minus',
  'el-icon-money': 'Money',
  'el-icon-more-filled': 'MoreFilled',
  'el-icon-mouse': 'Mouse',
  'el-icon-mug': 'Mug',
  'el-icon-mute': 'Mute',
  'el-icon-mute-notification': 'MuteNotification',
  'el-icon-no-smoking': 'NoSmoking',
  'el-icon-notebook': 'Notebook',
  'el-icon-notification': 'Notification',
  'el-icon-odometer': 'Odometer',
  'el-icon-office-building': 'OfficeBuilding',
  'el-icon-open': 'Open',
  'el-icon-operation': 'Operation',
  'el-icon-opportunity': 'Opportunity',
  'el-icon-orange': 'Orange',
  'el-icon-paperclip': 'Paperclip',
  'el-icon-partly-cloudy': 'PartlyCloudy',
  'el-icon-pear': 'Pear',
  'el-icon-phone': 'Phone',
  'el-icon-phone-filled': 'PhoneFilled',
  'el-icon-picture': 'Picture',
  'el-icon-picture-filled': 'PictureFilled',
  'el-icon-picture-rounded': 'PictureRounded',
  'el-icon-pie-chart': 'PieChart',
  'el-icon-place': 'Place',
  'el-icon-platform': 'Platform',
  'el-icon-plus': 'Plus',
  'el-icon-pointer': 'Pointer',
  'el-icon-position': 'Position',
  'el-icon-postcard': 'Postcard',
  'el-icon-pouring': 'Pouring',
  'el-icon-present': 'Present',
  'el-icon-price-tag': 'PriceTag',
  'el-icon-printer': 'Printer',
  'el-icon-promotion': 'Promotion',
  'el-icon-question-filled': 'QuestionFilled',
  'el-icon-rank': 'Rank',
  'el-icon-reading': 'Reading',
  'el-icon-reading-lamp': 'ReadingLamp',
  'el-icon-refresh': 'Refresh',
  'el-icon-refrigerator': 'Refrigerator',
  'el-icon-remove': 'Remove',
  'el-icon-remove-filled': 'RemoveFilled',
  'el-icon-right-arrow': 'Right',
  'el-icon-scale-to-original': 'ScaleToOriginal',
  'el-icon-school': 'School',
  'el-icon-scissor': 'Scissor',
  'el-icon-search': 'Search',
  'el-icon-select': 'Select',
  'el-icon-sell': 'Sell',
  'el-icon-semi-select': 'SemiSelect',
  'el-icon-service': 'Service',
  'el-icon-set-up': 'SetUp',
  'el-icon-setting': 'Setting',
  'el-icon-share': 'Share',
  'el-icon-ship': 'Ship',
  'el-icon-shop': 'Shop',
  'el-icon-shopping-bag': 'ShoppingBag',
  'el-icon-shopping-cart': 'ShoppingCart',
  'el-icon-shopping-cart-full': 'ShoppingCartFull',
  'el-icon-shopping-trolley': 'ShoppingTrolley',
  'el-icon-smoking': 'Smoking',
  'el-icon-soccer': 'Soccer',
  'el-icon-sold-out': 'SoldOut',
  'el-icon-sort': 'Sort',
  'el-icon-sort-down': 'SortDown',
  'el-icon-sort-up': 'SortUp',
  'el-icon-stamp': 'Stamp',
  'el-icon-star': 'Star',
  'el-icon-star-filled': 'StarFilled',
  'el-icon-stopwatch': 'Stopwatch',
  'el-icon-success-filled': 'SuccessFilled',
  'el-icon-sugar': 'Sugar',
  'el-icon-suit': 'Suit',
  'el-icon-suitcase': 'Suitcase',
  'el-icon-sunny': 'Sunny',
  'el-icon-sunrise': 'Sunrise',
  'el-icon-sunset': 'Sunset',
  'el-icon-switch': 'Switch',
  'el-icon-switch-button': 'SwitchButton',
  'el-icon-switch-filled': 'SwitchFilled',
  'el-icon-takeaway-box': 'TakeawayBox',
  'el-icon-ticket': 'Ticket',
  'el-icon-tickets': 'Tickets',
  'el-icon-timer': 'Timer',
  'el-icon-toilet-paper': 'ToiletPaper',
  'el-icon-tools': 'Tools',
  'el-icon-top-left': 'TopLeft',
  'el-icon-top-right': 'TopRight',
  'el-icon-trophy': 'Trophy',
  'el-icon-trophy-base': 'TrophyBase',
  'el-icon-truck': 'Truck',
  'el-icon-turn-off': 'TurnOff',
  'el-icon-umbrella': 'Umbrella',
  'el-icon-unlock': 'Unlock',
  'el-icon-upload': 'Upload',
  'el-icon-upload-filled': 'UploadFilled',
  'el-icon-user': 'User',
  'el-icon-user-filled': 'UserFilled',
  'el-icon-van': 'Van',
  'el-icon-video-camera': 'VideoCamera',
  'el-icon-video-camera-filled': 'VideoCameraFilled',
  'el-icon-video-pause': 'VideoPause',
  'el-icon-video-play': 'VideoPlay',
  'el-icon-view': 'View',
  'el-icon-wallet': 'Wallet',
  'el-icon-wallet-filled': 'WalletFilled',
  'el-icon-warning': 'Warning',
  'el-icon-warning-filled': 'WarningFilled',
  'el-icon-watch': 'Watch',
  'el-icon-watermelon': 'Watermelon',
  'el-icon-wind-power': 'WindPower',
  'el-icon-zoom-in': 'ZoomIn',
  'el-icon-zoom-out': 'ZoomOut',

  // 数据库相关
  'mysql': 'Coin',
  'postgresql': 'DataBoard',
  'oracle': 'Monitor',
  'sqlserver': 'Database',
  'sqlite': 'Document',
  'mariadb': 'Coin',
  'h2': 'DocumentCopy',
  'derby': 'Box',
  'hsql': 'Setting',
  'clickhouse': 'Grid',
  'dm': 'Cpu',
  'kingbase': 'Connection'
}

// 获取新图标名称
export function getNewIconName(oldIconName) {
  return iconMapping[oldIconName] || oldIconName
}

// 检查是否为旧的 Element UI 图标
export function isOldElementIcon(iconName) {
  return iconName && iconName.startsWith('el-icon-')
}